/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 季节月份Entity
 * @author liujiang
 * @version 2013-07-02
 */
@Entity
@Table(name = "system_definition_area_season_detail")
@IdClass(SeasonMonthPK.class)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SystemDefinitionAreaSeasonDetail extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private SystemDefinitionAreaSeason systemDefinitionAreaSeason; 		// 区域
	private SystemDefinitionMonth systemDefinitionMonth; 		// 月份

	public SystemDefinitionAreaSeasonDetail() {
	}
	
	@Id
	@ManyToOne(cascade=CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name="SDAS_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public SystemDefinitionAreaSeason getSystemDefinitionAreaSeason() {
		return systemDefinitionAreaSeason;
	}

	public void setSystemDefinitionAreaSeason(SystemDefinitionAreaSeason systemDefinitionAreaSeason) {
		this.systemDefinitionAreaSeason = systemDefinitionAreaSeason;
	}
	
	@Id
	@ManyToOne(cascade=CascadeType.REFRESH, fetch = FetchType.LAZY)
	@JoinColumn(name="MONTH_ID")
	@NotFound(action = NotFoundAction.IGNORE)
	@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
	@NotNull
	public SystemDefinitionMonth getSystemDefinitionMonth() {
		return systemDefinitionMonth;
	}
	
	public void setSystemDefinitionMonth(SystemDefinitionMonth systemDefinitionMonth) {
		this.systemDefinitionMonth = systemDefinitionMonth;
	}

}


